
#ifndef __DECRYPT_WRAPPER_H
#define __DECRYPT_WRAPPER_H

#include "keys.h"
#include "../aprtools/APRBucketBrigade.h"

// Add in support for symmetric keys too

class DecryptWrapper
{
   public:
      void InitDecryptWrapper(const char *idkeyname, DecryptionKey *deckey, const char *ickeyname, CheckingKey *chkkey, int decompress);
      DecryptWrapper(const char *idkeyname, DecryptionKey *deckey);
      DecryptWrapper(const char *idkeyname, DecryptionKey *deckey, const char *ickeyname, CheckingKey *chkkey);
      DecryptWrapper(const char *idkeyname, DecryptionKey *deckey, int decompress);
      DecryptWrapper(const char *idkeyname, DecryptionKey *deckey, const char *ickeyname, CheckingKey *chkkey, int decompress);
      ~DecryptWrapper();
      std::vector<char> *DecryptBuffer(const char *buffer, size_t length);
      APRBucketBrigade *DecryptToBucket(APRBucketBrigade *bbrgde);
   private:
      char *dkeyname;
      char *ckeyname;
      DecryptionKey *deckeycopy;
      CheckingKey *chkkeycopy;
      int dodecompress;
      int wastrusted;
      apr_pool_t *mp;
};

#endif
